import { ProColumns } from '@ant-design/pro-components'

const columns: ProColumns[] = [
  {
    title: '维修记录编号',
    dataIndex: 'maintenanceId',
    formItemProps: {
      rules: [
        {
          required: true,
          message: '此项为必填项'
        }
      ]
    },
    width: '30%'
  },
  {
    title: '设备名称',
    dataIndex: 'equipmentName',
    width: '30%'
  },
  {
    title: '维修开始时间',
    dataIndex: 'maintenanceStartTime',
    search: false,
    width: '30%'
  },
  {
    title: '维修结束时间',
    dataIndex: 'maintenanceEndTime',
    search: false,
    width: '30%'
  },
  {
    title: '报修人',
    dataIndex: 'reporter',
    search: false,
    width: '30%'
  },
  {
    title: '故障描述',
    dataIndex: 'faultDescription',
    search: false,
    width: '30%'
  },
  {
    title: '维修人员',
    dataIndex: 'maintenanceStaff',
    search: false,
    width: '30%'
  },
  {
    title: '维修措施',
    dataIndex: 'maintenanceMeasures',
    search: false,
    width: '30%'
  },
  {
    title: '更换零部件清单',
    dataIndex: 'replacedPartsList',
    search: false,
    width: '30%'
  },
  {
    title: '维修费用',
    dataIndex: 'maintenanceCost',
    search: false,
    width: '30%'
  },
  {
    title: '维修结果',
    dataIndex: 'maintenanceResult',
    valueType: 'select',
    valueEnum: {
      1: '维修成功，设备恢复正常运行',
      2: '维修未彻底解决问题，仍存在部分故障'
    },
    search: false,
    width: '30%'
  },
  {
    title: '验收人员',
    dataIndex: 'inspector',
    search: false,
    width: '30%'
  },
  {
    title: '验收时间',
    dataIndex: 'inspectionTime',
    search: false,
    valueType: 'dateTime',
    width: '30%'
  },
  {
    title: '验收意见',
    dataIndex: 'inspectionComments',
    search: false,
    valueType: 'textarea',
    width: '30%'
  }
]
export default columns
